# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-vfs-sftp
pkgver=20.2.0
_realname=Nexus
pkgrel=1
pkgdesc="SFTP VFS add-on for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/vfs.sftp"
arch="x86_64 aarch64 armv7" # kodi is available only on these architectures
license="GPL-2.0-only"
makedepends="cmake libssh-dev kodi-dev samurai"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/vfs.sftp/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/vfs.sftp-$pkgver-$_realname"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
aadf58a9ab31f602219e781f19c0d6277b21a494197a4b9efcca75b33455e7d9d99e5c799fb4002e2900e25adc764bd82926be0516473e749767381123651a43  kodi-vfs-sftp-20.2.0-Nexus.tar.gz
"
